
export const reg_id_number =  '(^\\d{15}$)|(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)'
export const reg_email = '[^@ \\t\\r\\n]+@[^@ \\t\\r\\n]+\.[^@ \\t\\r\\n]+'
export const reg_number = '^[1-9]\\d*$'
export const reg_phone = '^1[0-9]{10}$'
export const reg_money = '(^[1-9]([0-9]{1,7})?(\\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\\.[0-9]([0-9])?$)'
export const reg_web = 'https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()!@:%_+.~#?&=]*)'
export const reg_password = '^(?=.*\\d)(?=.*[a-zA-Z])[a-zA-Z0-9]{8,20}$'
export const reg_html = /<(\S*?)[^>]*>.*?|<.*? > /ig

export const checkRules = (pattern,value) => {
    return RegExp(pattern).test(value)
}